home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5571 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  62 lines

  1. Newsgroups: comp.lang.c
  2. Path: uu4news.netcom.com!zodiac!szh
  3. From: szh@zcon.com (Syed Zaeem Hosain)
  4. Subject: Re: Does Borland C++ 5.0 still work with normal C???
  5. Message-ID: <1996Feb19.213738.3008@zcon.com>
  6. Sender: szh@zcon.com (Syed Zaeem Hosain)
  7. Nntp-Posting-Host: zodiac
  8. Reply-To: szh@zcon.com
  9. Organization: Z Consulting Group
  10. References: <4gag3n$a5u@wormer.fn.net>
  11. Date: Mon, 19 Feb 1996 21:37:38 GMT
  12.  
  13. In article <4gag3n$a5u@wormer.fn.net>, joakley@wichita.fn.net (Jess J Oakley) writes:
  14. >n4mwd@magg.net (Dennis Hawkins) wrote:
  15. >
  16. >>Does anybody know if the new Borland C++ compiler will compile normal C??  In 
  17. >>my opinion, if it doesn't, it is worthless.  I recently received a flyer from 
  18. >>Borland and there was no mention of being able to compile C.
  19. >
  20. >Probably so,   Since as far as I know anything written in C is legal
  21.                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  22. >within a  C++ program.
  23.  ^^^^^^^^^^^^^^^^^^^^^
  24.  
  25.  
  26. Oh, I would not make such a radical statement!  :-) See the following
  27. for a simple and trivial (albeit made up to show how such comments are
  28. dangerous) counter-example:
  29.  
  30. zodiac{3544}szh: cat foo.c
  31. #include <stdio.h>
  32.  
  33. int main ( int argc , char *argv[] )
  34. {
  35.   int new = 10;
  36.  
  37.   printf ( "new is %d\n" , new );
  38. }
  39. zodiac{3545}szh: cp foo.c foo.cpp
  40. zodiac{3546}szh: gcc -o foo foo.c
  41. zodiac{3547}szh: foo
  42. new is 10
  43. zodiac{3548}szh: g++ -o foo foo.cpp
  44. foo.cpp: In function `int main(int, char **)':
  45. foo.cpp:5: parse error before `new'
  46. foo.cpp:7: parse error before `)'
  47.  
  48.  
  49. >Obviously it wouldn't be a "TRUE" C++ program.
  50.  
  51.  
  52. I guess not!    :-)
  53.  
  54.                                 Z
  55.  
  56.  
  57. -- 
  58. -------------------------------------------------------------------------
  59. | Syed Zaeem Hosain          P. O. Box 610097            (408) 441-7021 |
  60. | Z Consulting Group        San Jose, CA 95161             szh@zcon.com |
  61. -------------------------------------------------------------------------
  62.